We will get a single line output and it is as follows:-

OUTPUT
The element that occurs more than n/2 number of times in this array is 2

